﻿<UserControl x:Class="CAION2.Views.SettingsLanguage_Page"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:resources="clr-namespace:CAION2.Properties" 
             xmlns:viewModels="clr-namespace:CAION2.ViewModels"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">

    <UserControl.Resources>
        <viewModels:SettingsViewModel x:Key="ViewModels"/>
    </UserControl.Resources>

    <Grid DataContext="{Binding Source={StaticResource ViewModels}}">
        <ScrollViewer>
            <StackPanel MinWidth="150">
                <TextBlock Text="{x:Static resources:Resources.LanguageTitle}" 
                           Style="{StaticResource Heading2}" 
                           Margin="0,0,0,8" />

                <Grid HorizontalAlignment="Left">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition MinWidth="120"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition />
                        <RowDefinition />
                        <RowDefinition />
                    </Grid.RowDefinitions>

                    <TextBlock Text="{x:Static resources:Resources.InterfaceLanguage}" 
                               VerticalAlignment="Center" 
                               Margin="0,0,16,4" />
                    <ComboBox Grid.Column="1" 
                              ItemsSource="{Binding InterfaceLanguages}" 
                              SelectedItem="{Binding SelectedInterfaceLanguage, Mode=TwoWay}" 
                              VerticalAlignment="Center" 
                              Margin="0,0,0,4" />

                    <TextBlock Grid.Row="1" Text="{x:Static resources:Resources.ItemsLanguage}" 
                               VerticalAlignment="Center" 
                               Margin="0,0,16,0" />
                    <ComboBox Grid.Row="1" 
                              Grid.Column="1" 
                              ItemsSource="{Binding ItemsLanguages}" 
                              SelectedItem="{Binding SelectedItemsLanguage, Mode=TwoWay}" 
                              VerticalAlignment="Center" />

                    <TextBlock Text="{x:Static resources:Resources.LanguageRestartNeed}" 
                               Foreground="{DynamicResource WindowTextReadOnly}"
                               VerticalAlignment="Center" 
                               Margin="0,10,16,4" 
                               FontSize="12"
                               Grid.Row="2"
                               Grid.ColumnSpan="2"/>

                </Grid>

            </StackPanel>
        </ScrollViewer>
    </Grid>
</UserControl>
